package com.cloud.freeflow.api.bean;

import java.util.HashMap;
import java.util.Map;

public enum YesNoEnum {
	NO("0", "否"), YES("1", "是");
	private static final Map<String, YesNoEnum> enumMap = new HashMap<String, YesNoEnum>();

	static {
		for (YesNoEnum yseNo : YesNoEnum.values()) {
			enumMap.put(yseNo.getValue(), yseNo);
		}
	}

	private String code;
	private String value;

	private YesNoEnum(String code, String value) {
		this.code = code;
		this.value = value;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public static YesNoEnum getYesNo(Integer code) {
		return enumMap.get(code);
	}

}
